<?php 
namespace Admin\Model;
use Think\Model;
class CommentsModel extends Model{
	public function getAll(){

		$list = $this->select();


		//处理数据性别
		$clevel = array('好评','中评','差评');
		foreach ($list as $key => $val){
			$list[$key]['clevel'] = $clevel[$val['clevel']];
		}

		$status = array('已评论','已回复');
		foreach($list as $key => $val){
			$list[$key]['status'] = $status[$val['status']];
		}

		foreach($list as $key => $val){
			date_default_timezone_set("PRC");  //设置中国时区
			$list[$key]['ctime'] = date('Y-m-d H:i:s',$list[$key]['ctime']);
		}

		
		return $list;
	}

}


 ?>